package com.sjdang.springcloud.learning.controller;

import javax.annotation.Resource;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.sjdang.springcloud.learning.service.NacosFeignService;

@RestController
@RequestMapping("/learning/nacos/feign")
public class NacosFeignController {
	
	private Logger log = LoggerFactory.getLogger(this.getClass());
	
	@Resource
	private NacosFeignService nacosFeignService;
	
	@GetMapping("/hello")
	public String sayHello() {
		log.info("nacos-feign is called  ");
		return nacosFeignService.sayHello("SpringCloud Nacos Feign");
	}

}
